Ranking and Unranking of t-Ary Trees Using RD-Sequences

نویسندگان

  • Ro-Yu Wu
  • Jou-Ming Chang
  • Yue-Li Wang
چکیده

In this paper, we introduce a concise representation, called right-distance sequences (or RD-sequences for short), to describe all t-ary trees with n internal nodes. A result reveals that there exists a close relationship between the representation and the well-formed sequences suggested by Zaks [Lexicographic generation of ordered trees, Theoretical Computer Science 10 (1980) 63–82]. Using a coding tree and its concomitant tables, a systematical way can help us to investigate the structural representation of t-ary trees. Consequently, we develop efficient algorithms for determining the rank of a given t-ary tree in lexicographic order (i.e., a ranking algorithm), and for converting a positive integer to its corresponding RD-sequence (i.e., an unranking algorithm). Both the ranking and unranking algorithms can be run in O(tn) time and without computing all the entries of the coefficient table. key words: t-ary trees, ranking, unranking, lexicographic order, coding trees

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parallel Generation of t-ary Trees

A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...

متن کامل

Ranking and Unranking of t-ary Trees Using the Right Distance Representation

In this paper, we introduce a concise representation, called right-distance sequences (or RD-sequences for short), to describe all t-ary trees with n internal nodes. A result reveals that there exists a close relationship between the representation and the well-formated integer sequences suggested by Zaks in 1980. Using recursion tree and its concomitant tables, a systematical way can help us t...

متن کامل

Parallel Enumeration of t–ary Trees in ASC SIMD Model

In this paper parallel algorithms are presented for enumeration and unranking of t–ary trees with n internal nodes. Generation algorithms are designed in the associative computing model ASC that belongs to a broad category of SIMD models. Tree sequences are generated in lexicographical order, with O(1) time per object, in a new representation, as combinations with repetitions with restricted gr...

متن کامل

Lexicographic Listing and Ranking of r-ary Trees

This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using...

متن کامل

Lexicographic Listing and Ranking of t-Ary Trees

This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • IEICE Transactions

دوره 94-D  شماره 

صفحات  -

تاریخ انتشار 2011